<#include "/common/layout_dl.html">
<@header>
</@header>
<@body>
 <form class="form-horizontal layui-form layui-form-pane"  method="post" action="/system/user/doEdit">
  <div class="box-body">
    <div class="form-group">
      <label for="uname" class="col-sm-2 control-label">User Name</label>
      <input type="hidden" value="${sysUser.id}" name="id">
      <div class="col-sm-10">
     	<input type="text" id="uname" name="userName" value="${(sysUser.userName)!}" class="form-control" placeholder="Please input user name" lay-verify="required|username">
    	</div>
    </div>
    <div class="form-group">
          <label  class="col-sm-2 control-label">Department</label>
          <div class="col-sm-10">
          <select name="deptId" class="form-control select2" style="width: 100%;" lay-verify="required" lay-ignore>
           <#list deptList as dept>
             <option value="${(dept.id)!}"  ${(sysUser.deptId?? && dept.id==sysUser.deptId)?string('selected="selected"','')}  >${(dept.deptName)!}</option>
           </#list>
         </select>
         </div>
       </div>
    <div class="form-group">
      <label for="password"  class="col-sm-2 control-label">Password</label>
      <div class="col-sm-10">
      <input type="password" class="form-control"  id="password"  name="password" placeholder="Don't change password if it's null." lay-verify="pass">
    	</div>
    </div>
    <div class="form-group">
      <label for="password"  class="col-sm-2 control-label">Confirm Password</label>
      <div class="col-sm-10">
      <input type="password" class="form-control"  id="confpassword"  name="confpwd" placeholder="Please retype password" lay-verify="pass|eqPwd">
    	</div>
    </div>
    <div class="form-group">
           <label  class="col-sm-2 control-label">Description</label>
           <div class="col-sm-10">
           <textarea class="form-control" name="userDesc" rows="3" placeholder="Please input description, not exceeding 300 characters..." >${(sysUser.userDesc)!}</textarea>
           </div>
         </div>
    <div class="form-group">
    	   <label  class="col-sm-2 control-label">Status</label>
    	   <div class="col-sm-10">
         <label>
           <input name="userState" type="radio" class="minimal" ${(sysUser.userState == 1)?string('checked','')} value="1" lay-ignore> Enabled
         </label>
         <label>
           <input name="userState" type="radio" class="minimal" ${(sysUser.userState == -1)?string('checked','')}  value="-1" lay-ignore> Disabled
         </label>
         </div>
       </div>
       <div class="form-group">
       	<label  class="col-sm-2 control-label">Role</label>
       	<div class="col-sm-10">
       	<#list sysRoles as role>
          <label title="${(role.roleDesc)!}">
            <input type="checkbox" name="roleId" class="minimal" value="${(role.id)!}" ${(myRolds?seq_contains('${role.id}')?string('checked',''))} lay-ignore>
            ${(role.roleName)!}
          </label>
          &nbsp;
         </#list>
         </div>
       </div>
       <div class="form-group">
       	<label  class="col-sm-2 control-label"></label>
       	<div class="col-sm-10">
       		 <button type="submit" class="btn btn-success" lay-submit lay-filter="submit"><i class="fa fa-save"></i>  Submit</button>
       	</div>
       </div>
  </div><!-- /.box-body -->
</form>
</@body>
<@footer>
</@footer>